/*
 * @Author: Will
 * @Date: 2021-09-28 08:49:37
 * @LastEditTime: 2024-02-22 11:26:21
 * @LastEditors: MarsLay 331412466@qq.com
 * @Description: In User Settings Edit
 * @FilePath: \smart-sports-manage\store\index.js
 */
import Vue from "vue";
import Vuex from "vuex";
const api = ["http://192.168.0.10:4910"];
const dev = 0;
Vue.use(Vuex);
const store = new Vuex.Store({
  state: {
    api: api[dev],
    navInfo: {},
    pageDefault: 1,
    pageLimit: 15,
    routeType: [
      { key: "traffic", path: "/static/img/icon/traffic-icon.png" },
      { key: "food", path: "/static/img/icon/food-icon.png" },
      { key: "place", path: "/static/img/icon/place-icon.png" },
      { key: "hotel", path: "/static/img/icon/hotel-icon.png" },
    ],
  },
  getters: {
    getRouteTypeByKey: (state) => (key) => {
      return state.routeType.find((item) => item.key === key);
    },
  },
  mutations: {},
  actions: {},
});
export default store;
